package com.cetool.autocms.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * 分页请求类
 *
 * @param <T>
 * @author 端木超群
 * @date 2021/11/05
 */
@Data
@ApiModel("分页请求对象")
public class PageRequest<T> {
    /**
     * 当前页
     */
    @ApiModelProperty(value = "当前页", required = true, example = "1")
    @NotNull(message = "当前也不能为空")
    private Integer pageNum;

    /**
     * 每页数量
     */
    @ApiModelProperty(value = "每页数量", required = true, example = "10")
    @NotNull(message = "每页数量不能为空")
    private Integer pageSize;

    /**
     * 分页请求参数对象
     */
    @Valid
    private T data;

}
